All Questions
5 questions
1vote
1answer
711views
Exponentially-weighted moving mean and standard deviation of an irregularly-spaced weighted time series
The following numpy/python function computes exponentially-weighted moving mean and standard deviation of an irregularly-spaced weighted time series. I want to make it faster by getting rid of the ...
2votes
1answer
190views
Computing the angle between two vectors (vectorized) for small angles and with few copies
I am implementing a function that computes the angle between two vectors when given two n-dimensional arrays and an axis along which to operate. I want to do this with as few copies as possible, and ...
5votes
2answers
219views
Snake game from the viewpoint of the snake
I wrote a little game of Snake where you can see the field in which the snake moves fixed and you can also see the "viewpoint" of the snake, which is basically calculating the positions of ...
11votes
1answer
348views
Calculate the closest point to many hyperbolic paraboloids
In this question I asked for a way to compute the closest projected point to a hyperbolic paraboloid using python. Using the iterative approximation answer, I'm able to use the code below to ...
5votes
2answers
113views
Efficient calculation of bond overlap
For a small library dealing with molecules, I have to calculate a so called connectivity table for the chemical bonds. I assume that there is a bond between atom i and atom j, if the distance between ...